function main() {
    alert('你好')
}

main();


 var getSelectedLayersIdx = function getSelectedLayersIdx() {
        var selectedLayers = [];
        var docRef = new ActionReference();
        docRef.putEnumerated(charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
        var docDesc = executeActionGet(docRef);

        if (docDesc.hasKey(stringIDToTypeID("targetLayers"))) {
            var layersList = docDesc.getList(stringIDToTypeID("targetLayers"));

            var count = layersList.count;

            for (var i = 0; i < count; i++) {
                try {
                    selectedLayers.push(layersList.getReference(i).getIndex());
                } catch (e) {
                    selectedLayers.push(layersList.getReference(i).getIndex() + 1);
                }
            }
        } else {
            var layerRef = new ActionReference();
            layerRef.putProperty(charIDToTypeID("Prpr"), charIDToTypeID("ItmI"));
            layerRef.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));

            try {
                selectedLayers.push(executeActionGet(layerRef).getInteger(charIDToTypeID("ItmI")) - 1);
            } catch (e) {
                selectedLayers.push(executeActionGet(layerRef).getInteger(charIDToTypeID("ItmI")));
            }
        }

        return selectedLayers;
    };